<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <div th:include="includeJs::layui_js"></div>
    <title>Document</title>
</head>
<body>
    <table class="layui-hide" id="test"></table>
    <script>
        layui.use('table', function(){
            var table = layui.table;

            table.render({
                elem: '#test'
                ,url:'/integral/integralListJson'
                ,cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
                ,cols: [
                [
                    // {field:'id', title: 'ID', sort: true}
                    {field:'eventDate', title: '改变时间', sort: true,templet:"<div>{{layui.util.toDateString(d.eventDate, 'yyyy-MM-dd HH:mm:ss')}}</div>"} //width 支持：数字、百分比和不填写。你还可以通过 minWidth 参数局部定义当前单元格的最小宽度，layui 2.2.1 新增
                    ,{field:'source', title: '事件'}
                    ,{field:'getintegral', title: '积分数', sort: true}
                ]
                ]
                ,page: true
                ,limits:[5,10]
            });
        });
    </script>
</body>
</html>
